package com.example.dao;

import com.example.entity.Organization;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface OrganizationDao {

    List<Organization> findAllOrganizations();
    Organization findOrganizationByOrgid(Integer orgid);
    int insertOrganization(Organization organization);
    int updateOrganization(Organization organization);
    int deleteOrganization(Integer orgid);
    List<Organization> searchOrganizations(@Param("org_name") String org_name, @Param("org_type") String org_type);
    void saveOrganizations(Organization organization);
    
     Organizations findByUsername(@Param("username") String username);


    // 新增方法


    Organizations findByUserId(@Param("userid") int userId);
    void update(Organizations org);
    boolean existsById(@Param("orgId") int orgId);
}

